package com.ruoyi.sale.mapper;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ruoyi.sale.domain.ShipmentsProduct;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
* @author Admin
* @description 针对表【tb_shipments_product(销售计划明细表)】的数据库操作Mapper
* @createDate 2025-02-27 11:35:48
* @Entity com.ruoyi.report.domain.ShipmentsProduct
*/
@Mapper
public interface ShipmentsProductMapper extends BaseMapper<ShipmentsProduct> {


	/**
	 * 根据id查询对应的明细数据
	 * @param shipmentsProductIds
	 * @return
	 */
	List<ShipmentsProduct> selectListByIds(@Param("list") List<String> shipmentsProductIds);

	/**
	 * 提前结束销售计划（修改是否已全部下单状态）
	 * @return
	 */
	int endPlanById(@Param("planId") Long planId,@Param("detailId") String detailId);

	/**
	 * 根据采购订单id查询对应的销售计划明细
	 * @param procuredOrderId
	 * @return
	 */
	List<ShipmentsProduct> getSalesPlanDetailsByPurchaseOrderId(@Param("ordersId") String procuredOrderId);
}




